mudbox::Transformation Class Reference

#include <transformation.h>

Inheritance diagram for mudbox::Transformation:

Inheritance graph
[legend]
List of all members.

Detailed Description

A Transformation is a node in the Mudbox scene that controls the size and position of other nodes, such as lights, cameras, or polygon meshes.

It represents transformations as a combination of scaling, rotation, and translation, applied in that order.

The position of a GroupNode is determined solely by the matrix of its parent Transformation node. In other words, while it is possible to arrange scene objects into a hierarchy, the transformation matrices up the hierarchy are NOT composited together to produce a final transformation.


Public Member Functions

virtual const mudbox::ClassDesc RuntimeClass (void) const
virtual Vector  TransformToWorld (const Vector &vL, float fW=1.0f)
  Transforms a Vector from local space into world space.
virtual Vector  TransformToLocal (const Vector &vW, float fW=1.0f)
  Transforms a Vector from world space into local space.
virtual Matrix  LocalToWorldMatrix (void)
  Returns a Matrix that can transform points or vectors from local space into world space.
virtual Matrix  WorldToLocalMatrix (void)
  Returns a Matrix that can transform points or vectors from world space into local space.
virtual void  SetLocalToWorldMatrix (const Matrix &mMatrix)
  Sets the Matrix for this object that will transform points and vectors from local space to world space.
virtual Vector  Rotation (void) const
  Returns the rotation component of the current transformation as yaw-pitch-roll (x,y,z) values in a Vector.
virtual void  SetRotation (const Vector &vYawPitchRoll)
  Sets the rotation component of the current transformation.
virtual void  SetRotation (const Matrix &mRotation)
  Sets the rotation component of the current transformation by specifying a rotation matrix.
virtual void  AddRotation (const Vector &vYawPitchRoll, bool bAfter=false)
  Adds additional rotation to the current transformation.
virtual Vector  Position (void) const
  Returns the current position (translation) of the object.
virtual void  SetPosition (const Vector &vVector)
  Sets the position (translation) of the object.
virtual Vector  Scale (void) const
  Returns the scale factors of the current transformation.
virtual void  SetScale (const Vector &vScale)
  Sets the scale factors of the current transformation.

Static Public Member Functions

const mudbox::ClassDesc StaticClass (void)
mudbox::Node CreateInstances (unsigned int iCount=1)

Member Function Documentation

virtual const mudbox::ClassDesc* mudbox::Transformation::RuntimeClass void   )  const [inline, virtual]
 

Reimplemented from mudbox::GroupNode.

00050 :
const mudbox::ClassDesc* mudbox::Transformation::StaticClass void   )  [static]
 

Reimplemented from mudbox::GroupNode.

mudbox::Node* mudbox::Transformation::CreateInstances unsigned int  iCount = 1  )  [static]
 

Reimplemented from mudbox::GroupNode.

virtual Vector mudbox::Transformation::TransformToWorld const Vector vL,
float  fW = 1.0f
[virtual]
 

Transforms a Vector from local space into world space.

The Vector class in this SDK is used to represent both points in 3d space, and true vectors (which have directional, but no positional information.) By default, this method assumes that you are transforming a point, and so sets the W value to 1.0. If you are in fact transforming a true vector, you should set fW to 0.

Parameters:
vL  [in] The point or vector to be transformed
fW  [in] The "W" value. Leave as 1.0 for points, set to 0.0 for vectors
virtual Vector mudbox::Transformation::TransformToLocal const Vector vW,
float  fW = 1.0f
[virtual]
 

Transforms a Vector from world space into local space.

The Vector class in this SDK is used to represent both points in 3d space, and true vectors (which have directional, but no positional information.) By default, this method assumes that you are transforming a point, and so sets the W value to 1.0. If you are in fact transforming a true vector, you should set fW to 0.

Parameters:
vW  [in] The point or vector to be transformed
fW  [in] The "W" value. Leave as 1.0 for points, set to 0.0 for vectors
virtual Matrix mudbox::Transformation::LocalToWorldMatrix void   )  [virtual]
 

Returns a Matrix that can transform points or vectors from local space into world space.

virtual Matrix mudbox::Transformation::WorldToLocalMatrix void   )  [virtual]
 

Returns a Matrix that can transform points or vectors from world space into local space.

virtual void mudbox::Transformation::SetLocalToWorldMatrix const Matrix mMatrix  )  [virtual]
 

Sets the Matrix for this object that will transform points and vectors from local space to world space.

Parameters:
mMatrix  [in] A 4x4 transformation matrix
virtual Vector mudbox::Transformation::Rotation void   )  const [virtual]
 

Returns the rotation component of the current transformation as yaw-pitch-roll (x,y,z) values in a Vector.

The return values are in degrees.

virtual void mudbox::Transformation::SetRotation const Vector vYawPitchRoll  )  [virtual]
 

Sets the rotation component of the current transformation.

The scaling and translation remain unaffected.

Parameters:
vYawPitchRoll  [in] The new rotation value specified as yaw-pitch-roll (x,y,z), in degrees.
virtual void mudbox::Transformation::SetRotation const Matrix mRotation  )  [virtual]
 

Sets the rotation component of the current transformation by specifying a rotation matrix.

The scaling and translation remain unaffected.

Parameters:
mRotation  [in] A 4x4 rotation matrix
virtual void mudbox::Transformation::AddRotation const Vector vYawPitchRoll,
bool  bAfter = false
[virtual]
 

Adds additional rotation to the current transformation.

The scaling and translation remain unaffected.

Parameters:
vYawPitchRoll  [in] The rotation value to be added, specified as yaw-pitch-roll (x,y,z), in degrees.
bAfter  [in] If true, the new rotation will be applied AFTER the existing one. If false, the new rotation will be applied before the existing one.
virtual Vector mudbox::Transformation::Position void   )  const [virtual]
 

Returns the current position (translation) of the object.

(That is, the position of the origin after being transformed from local space to world space.)

virtual void mudbox::Transformation::SetPosition const Vector vVector  )  [virtual]
 

Sets the position (translation) of the object.

Parameters:
vVector  [in] The new translation value
virtual Vector mudbox::Transformation::Scale void   )  const [virtual]
 

Returns the scale factors of the current transformation.

virtual void mudbox::Transformation::SetScale const Vector vScale  )  [virtual]
 

Sets the scale factors of the current transformation.

Parameters:
vScale  [in] The new scale factors in x, y, and z.

mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation
mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation mudbox::Transformation